import java.util.Scanner;

/**
 * @author zhaoqian
 * @create 2021/8/31 10:53
 */
public class chuan {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()){
            int length=0;
            String s = in.nextLine();
            String[] s1 = s.split(" ");
            for (String a:s1) {
             length=a.length();
            }
            System.out.println(length);
        }
    }
}
